package com.triplelink.entity.sibling;

import java.util.ArrayList;
import java.util.List;

import resource.UrisClasses;
import resource.UrisSibling;

import com.triplelink.annotations.ClassType;
import com.triplelink.annotations.Id;
import com.triplelink.annotations.ObjectProperty;
import com.triplelink.annotations.Property;

@ClassType(type = UrisClasses.HOUSE)
public class HouseEntity
{
	@Id
	private String id;
	
	@ObjectProperty
	@Property(uri = UrisSibling.HAS_OWNER)
	private SiblingEntity owner;
	
	@ObjectProperty
	@Property(uri = UrisSibling.HAS_RESIDENT)
	private List<SiblingEntity> residentes;
	
	@ObjectProperty
	@Property(uri = UrisSibling.NEAR_FROM)
	private HouseEntity nearFrom;

	public SiblingEntity getOwner() {
		return owner;
	}

	public void setOwner(SiblingEntity owner) {
		this.owner = owner;
	}

	public List<SiblingEntity> getResidentes() {
		
		if (residentes ==null)
			residentes = new ArrayList<SiblingEntity>();
		
		return residentes;
	}

	public void setResidentes(List<SiblingEntity> residentes) {
		this.residentes = residentes;
	}

	public HouseEntity getNearFrom() {
		return nearFrom;
	}

	public void setNearFrom(HouseEntity nearFrom) {
		this.nearFrom = nearFrom;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
